﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace EADCA3WebService
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IRestaurantService" in both code and config file together.

    [MetadataType(typeof(RestaurantInfo))]
    public partial class Restaurant
    {
        // ...
    }

    public class RestaurantInfo
    {
        [DataMember]
        public int ID;

        [DataMember]
        public string Name;

        [DataMember]
        public string Address;

        [DataMember]
        public string Category;

        [DataMember]
        public string PhoneNum;

        [DataMember]
        public string PostCode;

        [DataMember]
        public int Star_Rating;
    }
    
    [ServiceContract]
    public interface IRestaurantService
    {
        // method to display restaurant listing by cuisine category e.g. European, Italian etc.
        [OperationContract]
        List<Restaurant> DisplayByCategory(string category);
    }
}
